- Use strings.Builder instead of concatenation - Move smart tree to a separate file - Add missing docstrings