more work on the new lighting/palettes system
crashfix