Refactored test building.