Simplified the code in get-dependency.php