Lots of changes to the AI