Refactor backend toggle routes, again