Had an extra writeItems() call
Added a cancel button on the edit page