Fixed blank blocks being added when adding special schedules and cleaned up some code and merge conflicts