Refactor the updating logic
Merge branch 'dev' of https://github.com/GeoffreyLong/scheduler into dev