Call completion after inserting of "dependency"
Minor code change: optimization.
Fix typo.
Minor code change: simplifying to remove warning.