Refactored logic to the item model