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. Would also allow theme creators to create a custom theme "install" to run SQL to create additional tables/metadata that are required as part of a theme.