remove mutual dependency between Document, Element, and Parser. created Node as the factory