Code cleanup

Cleaned up extra code and added some more documentation.
Finished writing tests for model implementation
Refactored code and made it compliant with PEP8