Improved saving and editing of context