Cleaned up code and rearranged directories

Cleaned up how the code lives and rearranged some of the directories.