Matrix function contracts, equals contract, and fixed other contracts that were failing tests.
Changed as per review.
Merge pull request #16 from isupeene/function_contracts

Matrix function contracts, equals contract, and fixed other contracts th...
Merged #16.