refactor graphscontroller for maintainability
refactor graphscontroller for maintainability

It should also increase the readability.

ontohub/ontohub,ontohub/ontohub,ontohub/ontohub,ontohub/ontohub,ontohub/ontohub,ontohub/ontohub