Small tidyups, not tested