Added visitor for simulation tree and unit tests. Work in progress.