Remove "distance" from the callbacks. Implemented a system for checking for substrings.