Actually will try to remove this function and use regular expression matches instead.