Fixing Mask plane info and using multiprocessing to speed things up