Add missing dependency, remove unused code