Adding graph subtypes and updating graph code