Remove unwanted newline
Add createTreeWalker method