Add tests and integration with MVC dispatch