Clean up simplify path and refactor
Clean up serialize binary tree