RouteManger: Added more javadoc to explain hard-to-understand code.