Another bunch of fixes and changes.