Few code tidy ups