Refactored poll_view.js