Fixes for protocol visualization, new functions