router cleanup and reorg, fixed bug preventing parameters from being passed from the route