exit_json and fail_json are repeated many times?  Should this be refactored to maybe just set variable that are passed into each field of the appropriate XXX_json method?