cleaned up lights code and imports