accomodate pipeline API changes and some cleanup