fix counter for Search(N) test
change gc calling
some fixes and refactoring