Simplified and cleaned up stress test code.