Reworked the inventory screen's code