Added the nlink method and supporting code.