Added missing ?> at the end.  Added check to see if the API key and token constants were already defined so that the project could be included in a submodule without having to edit the project's ca-config.php