Fix xrefs.
Logging and other cool stuff