Working edit functionality. Add delete code in model