Added some comments to clarify some of the decisions taken...
replaced the code of body-sibling execution path with appendToParent()
function...
Merge pull request #6 from dineshjweerakkody/dilan_dev

Dilan dev, I have merged your changes. Thanks