Refactor tests so they don't all have to be run at once.