Moved the code remote duplicated doclets from template to plugin.