Added unit tests and match validator.