Refactor dependencies list into internal and external