minor code fixes and link tweaks