Refactored AI class to eliminate redundancies