fixes bug loading new image with different masks and cleans up code 8cd1abb Alexander McKinney commited on Nov 14, 2022