Added matrix class.