tuna: overwork and clean up lights.c