Slight refactoring of update timer code