Removed old tests
Refactored the controller code. It is now spreaded over different files