Refactor code for SubjectProcess