Mem leak addressed, datum editing cleaned