Various old fixes and possibly some breakage.