Refactor all functions and have them do one thing well, carefully manage types and variables, return values