Reorganized graph stuff