Refactor out the controllers code into separate files.