Add link type & neighbor column, slight refactoring