Added trait_exists in a bunch of places