change Item.delete() to .remove()
refactor code to match recommended style guide