Refactored code to allow for code growth