basic functionality for flow diagram ported over

still needs some css tweaks