Edited controllers to respond to JSON for command line HTTP requests.