Create separate functions for committing plot data and tree data