Work in progress on rewrite to use minitask for parallel processingh