Refactor with hlint suggestions