Switch to using createRange for element comparision instead of Array indexOf checks...