Refactor and simplify DeclUpdates serialization.