fix link_hn references
handle passing in errors better, and the port test minimally works now