added comments to poll graph and factored out code from html