Refactored REST API for better dataflow. Ensures ALL response communication will be a JSON object.