Poll plugin code clean-up