reorganisation to allow switching between stub implementation and full closed-source graph implementation