inventory: Replace diseased-brain code