Add editing and updating functionality