Refactored code and project