AI is working
fixes some bugs and tweaks rendering