[FIX] minor const fixes
[FEATURE] speedup and restructurin speedup and restructuring
[FEATURE] multi-threaded search