better code organization for items, few fixes