FE-727 add unit tests to worker improve performance and remove memory leak in pipe route