Added neighbors tests and fixed a bug in brute force search