Did some refactoring of my code related to uploading Trinity data.