lightsource cleanup and general cleanup