Refactor into seperate packages. Next is code cleanup and addition of javadocs for functions and classes