Added initialize and finalize to the model.