Add id resolving to goto and options.
Add autodiscovery of functions needing id updating.