lots of refactoring; added self link; added item resource