JSHint compliant and added logging for which patterns have been processed