Tons of debug fixes.