More interactive refine

and more test cases