fairly major rewrite of various timing related stuff.