[BUG #8593] Added a API to add template without loading
[BUG #8571] Minor fix in the depleting for the tree.