Refactoring: implemented builder pattern to make easier defining of parameters for building tree