fixed the last major bugs, improved AI flexibility