Added element saving to creation and edit methods