Do scheduled shutdowns even if we're late, and more.
Cleaned up a lot of the time related code while I was at it.