Separed out route_handler logic into route_register module