Improve comments and tests for resource_router