Refactor and simplify.
Add more tests for .check method