Added controls for beam search.