Edit plan logic
Updates to allow plan editing.