Changes to terrain handling.
Added lighting support.