Cleaned up the code for link testing.  Now working on link expansion