Adds timeStamp and improved memory management.