Remove unnecessary matchs and codes and modify some expression.
Create new method to generate Element and Text for pseudo and resolve memory leak problem by using new type LayoutPseudoNode