cleaning up piped API and documenting