Cleaning and error checking & timestamps.