Initial shift to JS lib for detection