cleaned up pins_controller. Put the API stuff with json out