Refactoring thanks to hlint