added test example for jgraphx
cleaning code