Lots of refactoring. Both tree and concat representations working. Added easy way to plot various stats.