Massive restructuring of the code.   It's now way easier to write an AI
engine.