Added comments and cleaned up code in time.h and time.c