Moves the code to a separate class file.