Refactoring Item class to fit the object oriented programming.