add .isDirty property and .attrs property
add #revert
add #toObject for better serialization