Made the lighting engine multithreaded.