Added button polling thread