Project is working, but needs refactoring