Cleaned up the code, sped up get_neighbors by unrolling the loop, removed the overkill numpy stuff