Updates to work with multiple shades and fixes tests.