Added stresstest and major optimalizations.