Minor code tidyup