a bit cleanup, now uses THROUGHPUT rather than THROTTLE_RATE, parameter tweaking, made sure read_buffer is empty before killing thread that sends data