Behavior trees api refactored.