Time handling has been revamped. A lot of minor fixes were made.