Simplified and cleaned up lots of stuff in the time library