Feat: refactor optimizations to use tree traversal algorithm
This makes each optimization a single function that acts on an existing tree traversal function
This commit is contained in:
This makes each optimization a single function that acts on an existing tree traversal function