Removed print and comments, added the smart item type checking from OptimizeLayers to OptimizeAi so they both work the same now.