Incorporated the optimizations from load_test.c into main.c and optimized a bit further.