Implement getmodeltree command