Externalizing test fixtures and refine some tests