added code to tag figures as visible or not. Part of an effort to retain
diagram figure positions.

Also added code to do direct connections. Works. Commented out and
marked TODO.
Need to add a flag to en or disble it.