General code tidy.