Graph definition and layout algorithms.