made various refactorings, documentation improvements, and split the anonymous ScheduleTask class