Prettify time, improve some error messages