Slight modifications to make sure duplicate matches are ignored
Removed logging functions to prepare for deployment