let's also init timer in main because we can't be sure they really get initialized by os_core
also clean up the code a little while we're at it