Some minor refactoring for our graph panel (#112).