ISIS-676: fix to edit/cancel/edit issue
ISIS-654: very minor tidy-up of code.