Finish edit and remove function