Move code into separate files for maintainability.
Cut down on some LOC, fix notices.
Merge pull request #53 from jordandukart/7.x-make-pretty

7.x make pretty