Refactored class index to router.