Edit model and controller