Tidy up some code
Dependency injection / new router format

Dependency injection for controllers
New format of specifying rules for the router