Added Quad code serach and bunch of test cases