fix most glaring issues, down to ~3200 errors