refactored classes

Refactored the class definitions and class implementations into their
own .h and .cpp files