Calculated time of each record
Minor alterations
Added sanity checking