New simpler control loop and sample buffer implementation.