add unit tests;
correct several errors;
add tests on small and big datasets (.nq files).