Added tree-based calculation engine