markupgenerator: reorder functions