Added flag for not always creating the whole tree