Implement new references feature. Modules can now declare a references function which can return an array describing how to autogenerate code that links this module when autogenerating a module. Updated the contact module to implement this functionality