added closing pg client and added add poll buttons