Added code to flatten a list in which some node has an embeded list.
Names need to be improved