Refactor AI and core.
Refactor game.clj.