Minor code tidy up