Cleanups and fall back to HTML markup when markup configured module is missing

This fixes bug #2380.