added lighting, fixed reversed coordinates bug, and other small bugs