Fixes #1543

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
Fixes #1566

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
Cleanup of pipe unwrenching code.

Fixes #1509

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
Merge pull request #1568 from Mloc/tg-fix3

Miscellaneous fixes and pipe unwrenching cleanup.