Organized JSON response

Split the JSON parsing into seperate methods for flexibility