Update to head of aziz/master

Incorporate upstream changes.