Refactoring of backlight dimming

Please let me know if this is what you intended.

Cheers,
Christian