Added an debug output console. Also more tuning of path finding.