Added logic for 2-grram
fix
Fixed memory leak issue; Fixed 2-gram wildcard search.