Refactor according to hlint