Finished edit item function.