Split out SAO parsing
Update CTB to use a tree structure