Fixed pipe problems. Passing Tests