Optimize test structure2

Squashed #423