Added poke and flush; peek optimization.