Light engine updated, optimisations/fixes

Signed-off-by: Sam Hellawell <sshellawell@gmail.com>