Added back setlinks functionality