overwork and clean up lights.c - Credit to Slim