Improved AI
Still bugs
Merged ai into master