Integrate the checker with the constraints

Remove some old code. The code was very messy. Now, it is messy.