changed timespec2num macro

also some other cleanup