Even more refactoring, better collision detection, demo mode added, winnable AI.