better loading routing
Merge pull request #335 from k88hudson/router

Better routing for loading code