some code cleanup in book code
reduce q-search pruning margin