Removed special windows character ^M at end of every line
Instead of level by level parsing, algorithm now does recursive parsing