Routing improvements, clean up & refactoring