Refactored code base