Graphs in forms, round 1

Opening PR. Not yet ready for review.