Refactoring through the addition of more functions to make it less monolithic and more functionalesque