fixed minor graph-related issues, other small clean-ups