Code refactoring, cleanup, working directory reoganization

Refactored some code to better adhere to MVC architecture, cleaned up
deprecated code, restructured directories for organizational purposes