Tidy up of some transformation steps for readability