Refactor and redesign the `Item` class

Now there are different classes for different types of items instead of using the ``@type`` variable.