refactoring and docs updated in graphcontroller