Change some wildcards and remove redundant code