Refactor Pipe interface, missing test + doc