Fix tests
Add time code