Added improvements to handling multiple AI. Approximately 30% done.