Add new tests
Fix some time bugs revealed form tests