Fixed a typo and added editItem function.