Fix test logic, tiny error / import cleanup