Refactored inventory app