Refactor neighbor limits.