Bugfix/optimize pipeline manager

Fixes #32 and #33.