Refactor of plan creation and editing - done!