fixed memory leaks
added parallelization for nn search
Merge branch 'master' of https://github.com/stefanmay/obviously