added a bunch of new light functions

and simplified them a bit