--Tweaks to try to get remove pixels running in parallel
----Does not yet work because of errors with Knn being passed to a thread.