Uncommented and fixed debug code added to previous comment accidentally, moved SubLink class to a separate file