Changed the logic on embedded page generation, tweaked the visual feel a bit