Ensure that payloads respect MAX_JSON_SIZE.
reformat some constants
license headers for all the files.