cleanup and documentation
fix: get_dependencies: use local variable to cache dependencies
cosmetics
cope with duplicate entries in dependencies