Implemented a matrix class and used it for opengl transformations.