Lots of fixes.