Some refactoring.
Ready for advanced shadow casting shaders.
Custom shader for some awesome color in the shadow casting.