removes interfaces that are not needed