Converted the matrix library to follow opengl conventions.