Refactored some things.

Still working on the last matrix \time matrix test. Operation counts are not
agreeing so far.