various code cleanups + JUnit tests for pipeline descriptor and passing