Add dynamic ov_count vector
allocate ov space when compiling the tree
Refactoring match function