Made some improvments to the time scaling