1. route function renamed to get_type. 2. validate_type function removed, as get_type suffices the requirement.