Fixed some bugs. Was started work with editing of items.