User-defined templates part one.

Also introduced base template that doesn’t have the bookmarks
functionality.