better dependency injection, route manager, redirect router

update from upstream