Some UI-changes; AI rewritten