Converted to new-style classes, consolidated base AI to one file.