Partially convert poll plugin to use ES6 modules.