fixed system tree plotting and a couple of tests