Refactor code into an idea of what should work