shift all of the remaining logic out of he test route and into the controller. moving the problem a bit, but at least the route is nice and clean. fix some lint errors