Initial fully working version of Edit mode.