Added some AI stuff.