Annotation and cleanup
Moved functions for other analyses to a new file