Small fixes

- Fix for Issue #388
- Custom routes within a theme, useful for creating AJAX functions (and hijacking default routes) at theme level without modifying the core.