Code tidyups to make live