Finish edit functionality