Refactored data models. Take item type into account when rendering.