Extract functions to separate class
Remove splat for creating lists.

It's tripped me up a couple of time when I've provided a
single array. Keep it in the tests, which is the only place
where we are actually using that style.
Don't set instance variable that is never used.

Executing the function create a new tree so there's no
point in updating the old one.