fix count(*)
fix one issue with making arrays / objects from pipelined expressions
code cleanup, refactor functionality of pipeline schema