Reduce pipes and minor improvements