Remove transitive dependencies