Changed internal structure of build graph to something faster and easier to traverse