Flattens code. Reorganizes code.
Merge pull request #25 from Gistbook/code-cleanup

Flattens code. Reorganizes code.