Adding some tests and the ability to debug the CQ instance