Refactor for compilation of shaders