Changed loadShader so that it recognizes the shaders type by its file extension