First try to implement missing options setup based of reftools.c