PM vows to rid country of extremism, terrorism