fixes re self links, added 'link' subdirectory to js/model