Finished enqueue and create_dependency_graph functions.

Helper functions to help determine dependencies.