Code cleanup
Correct paramater name
Clean up and xml comments.
Moved a extension methods class to where it's used.
Use the generic extension method.