Updated the signature of custom callbacks. Updated some regexps.