cleaned up main
changed forward lists to vectors in graph
boundary term is now a metric