Implemented edit and update.