Ported Puller and some upstream changes.