added unregisterEventHandler to setGraph
reformatted all edited code files