changed the layout mechanism to accomadate loops and long links
Removed loops appearinf when none present