More refactoring, cleaned up the main application
Cleanup