typos and optimizations in tests
Merge branch 'optimized-tests' into develop