Pull code out of GlacierPipeMain