Refactor tests so models are only imported once.