Fix initial state setting.
Change how TIME is calculated.