Creating immutable tree.