Added preliminary lights support.
Engine frees buffers on scene->new/open. Minor fixers to IPR routines.