add arrange api endpoint; imrpove error handling; fix constructing CoggleApiNode object for node that already has children