[Untested] transition codes for dialog
[Tested] finish Edit dialog
[Tested] refactors