Rewrites and fixes.