Cleaned up graphing protocol implementation.