public DependencyGraph<CoffeeIdentifier> generateGraph(CoffeeTree tree) {
        DependencyGraph<CoffeeIdentifier> graph = new DependencyGraph<CoffeeIdentifier>();

        List<OutgoingReferences<CoffeeIdentifier>> outgoing = new ArrayList<OutgoingReferences<CoffeeIdentifier>>();
        Set<File> files = tree.getFiles();

        // 1. Iterate through each file and perform the first pass edge creation for the dependency graph
        for (File file : files) {
            CoffeeScope scope = tree.scopeFor(file);
            List<CoffeeToken> idTokens = scope.tokensFor(CoffeeTokenType.Identifier);

            if (null == idTokens) {
                continue;
            }

            // Collect all of the global identifiers, determine any potential identifiers referenced
            for (CoffeeToken idToken : idTokens) {
                CoffeeIdentifier identifier = new CoffeeIdentifier(idToken.getValue(), file, scope.getDepth());

                if (isAssignedToGlobal(scope, idToken)) {
                    scope.addAssignment(idToken);
                }

                if (isGlobalScoped(scope, idToken)) {
                    dependencies.add(identifier);
                }

                graph.add(identifier);
                outgoing.add(new OutgoingReferences<CoffeeIdentifier>(identifier, findReferencesIn(scope)));
            }
        }

        // 2. Resolve the other side of the dependencies -- this is the brute force alternative to look ahead parsing
        //    Probably lots of ways to optimize this!

        // After resolving all identifiers, resolve the outgoing references and add them to the dependency graph
        // Also, ignore any "identifiers" that fail to resolve. These are due to my lazy parsing below.
        for (OutgoingReferences<CoffeeIdentifier> references : outgoing) {
            CoffeeIdentifier parentIdentifier = references.getItem();

            for (DependencyReference<CoffeeIdentifier> idReference : references.getOutgoing()) {
                CoffeeIdentifier resolvedReference = idReference.get();
                if (null == resolvedReference) {
                    continue;
                }

                if (resolvedReference.getFile().equals(parentIdentifier.getFile())) {
                    continue;
                }

                graph.add(parentIdentifier, resolvedReference);
            }
        }

        return graph;
    }