Fixed some bugs in the matrix class. Implemented perspective, though it's still buggy.