2013-12-18-1158

Changed type of middle layer to match integer of inventory for easy
matching.