organize graph code into distinct packages