Further refactoring of AI Classes