Refactored to a plugin.