Small refactorings in Graph API