Added wrapper for shaders with unit test.
Bug correction, seen with a compiler warning.
Moved exception in separate file.