Added new DynamicPortListSettingsAttribute.
Added code that gets the settings attribute to use when creating
dynamic lists.
Added several line breaks to make the code more readable.
Updated several parts of the code to C# 4.0.
Converted some if statements to switches so the code is easier to read
and maintain.
Removed several redundant initialization statements.