Improved test scripts and changed DATA_RCVD detection