Add first draft of new id filter.
Large bug fix commit.
Add a setting for ws-template.