added route_before and route_after_adding_routes actions in the generateRoutes method to allow for hookin, will pass the routes array
added a check on the passed type in the actions