Added glob/match common functions, this part will need refactoring in a `utils` module