Big changes

Error handling cross platform, standard lighting finished for
directional, sport and point lights. General code cleanup.