Updating model, fixing order when writing data to model