AI added, bugfixes made