Initial add
Separate mass of code into more modular format.
Started laying out the structure.