major changes to automatically create citation links, completion functions at runtime