complete grpah editing; refactor pid building, additional pid checks, css fixes