Two new popup renderers

... and a refactoring of the renderers into a separate file.

And more tests.