Lots of little fixes, mostly related to timers