Consistent vars and other minor tidyups