tidied up routing and controller instantiation