Build and test refactorings so that tests run a bit faster.