Moved matrix functionality to GlMatrix and GlMatrixImpl