Const correctness fixes in lightmanager, minor fixes.