Merged Legend into the lighting system.

Added code from github.com/jae/Legend into Cave-Invaders