More tidyups, fixes.