Some small reorganization in tests