clean directory and refactoring with hlint