Modifications to get the model tree created at command instaed of at
load