Move the code that deals with 'refs' into its own module, just for separation
Changed the API a little - cross references now contain the segment in addition to the address
Changed how refs work - they are now hashes that can contain arbitrary fields