Remove useless newlines and try to utilise thread-last where possible to make transformations clearer to the reader.