Final project submission, refactored my way