some tidyups from previous commit