Add "Tree" interface and some classes implementing it to "calc.go"