[TASK] Simplify frontend page generation code