More work on creating subs and links