Editing deeply linked items from the edit dialog now works. Also some code simplifications.