Implemented the Matrix3 class.

Also made some small performance and documentation changes to existing
classes.