Completed add / edit functionality.