get rid of debug code
better handling for the graph tabs