Fix self loops for rankdir=LR and rankdir=RL
Remove redundant pass to get graph dimensions
Simplify border node removal