added the PHP errors in a serialized field
tidy up saving data and use Model.transaction for efficiency