Reorganized code and moved all controllers into separate files.