AI Code cleanup