Refactored loading script to take into account linksets as well