More safety checks
included a few more branches
not using decorator style schedule
clean up