Reorganized code into separate files.
Merge pull request #1 from rogueSnake/master

Reorganized code into separate files.