Factory-ized StudyBuilder and updated the test file