Update Schedule Work

Fixed bug on index and worked on updateSchedule, in theory it should be
complete.