Allow extension module to hook into the custom tags.

Also changed the tagname to be passed as atom rather than list.