Move neighbor queue to inner class