Support dependency injection for routes engine

Resolves issue #138