Make unit tests run faster by decreasing wait time and other optimizations
Style fix