Better heuristics to AI. Fixed bugs on GUI