Code: Cleanup and formatting.
Code: Organized.
Merge pull request #426 from am11/master

Code: Cleanup and formatting