Refactoring based on hlint