Changed time(0) calls to time(NULL) calls to be more pedantic.