New tikz code + used the new layers and djikstra alg to determine node position better

Please debug so I can add more cases to the arrow drawing. It is far from flawless. At least it creates flow charts that's followable.