Refactoring the LightManager internals and interface for more generic buffer support.