introduce immutable tree configuration class to avoid parameter passing