Remove unused modules.

Also sort modules, remove a few unused other variables, whitespace cleanup.
Merge pull request #1517 from AnalyticalGraphicsInc/removeUnusedModules

Remove unused modules.