fixed spaces/tabs and added graceful exit to trees Sim