good stopping point.
Added freeing mechainism, got rid of individual search timing, this timing is so short it's meaningless.
Fixed all memory leaks