Fix issue where item is not accessible

Refactors code to avoid using private data structure