Fixed a bunch, added ai