final cleanup of lighting code