Fixed an error in the neighbour generation method; I was appending to a list before the list was created