Added changes to fix several minor sorting, filtering, and pipelining issues