required routes here
moved the routes requiring from here
added register handler
added register middleware
fixed problem with module exporting