More refactoring for new database design.
Added ItemType class.