Final project refactoring