Refactor source structure and clean up code

Will make the file structure a bit more organized and remove some old code, comments, etc.