Refactor code into new objects.