added image processing tests and multithreading optimizations