add a lot of documentation and also a 'parseDOM' function to directly go from Text to Nodes and Elements