Test fix

Note that i've disabled src/unitest/neighbour_pipeline_test.py

Also, it was a long time i worked on this code, and i completely forgot all the details (especially the merging order, sorry).

Please check the changes carefully before merging.

Btw, if you enable travis-ci and coveralls then you should get fency coverage and test reporting.