Optimizer: add tests
tests wip
tests: wip
tree division refactoring: init
tests fix