Improvements for D3 factor graphs