pipe: almost all functions to pipe class function and refactoring with hlint