removing extraneous endpoint from image grid
moved array allocation inside of the function and cleaned cobwebs.
added multiprocessing to the direct iteration through indices (scheme 1)