substantial changes to painGrid for multiple seeds; minor fix to makeMedianDark