Time revisions
Switched over to time.h library, still some bugs