Added validation and complete inventory tracking functionality