Optimized some code and made slowhazard work better