First try to add graphite support into the core
graphite integration code cleanup (fixes #200, fixes #168)