Generate routes with helper function, looks better to maintain.