Refactor dnscurve plugin.