WIP refactor out AI class