updated routes
Updated controller to respond to JSON