Math routes and controller