cleanup in StudyProcessor