Code cleaning

Refactored light code into new methods. Compiling shaders use a private
method and small changes to resource creation and in general.