More work on edit mode.