Refactoring and replacing method for finding strings in the dom
Adding code that was pulled incase inspired to profile performance