Fixed many bugs, added Sankey visualization

Fixed many bugs, added Sankey visualization