Added ability to group items by their type, migrated db to contain item_type attribute