OpenElementsStack extracted. More body insertion mode job. Several refactorings