Replace tabs with spaces
Simpler way to remove children
Add XHTML support