Refactor config templates to extend a common base.

I don't like menu_bridges, menu_settings and menu_preview but don't now any other (easy) way.
Also adds doctype to some files.