Minor changes to the lighting code that hopefully give nicer results