clean up of dimmer tests
code cleanup and fix