Updated my matrix class

Still a work in progress but I use this for my own code.