Updated CoinstraintCheck. Added main testing method.