Add test for capture_hint, fix a couple interface bugs