Cleaned up test case and added logic to minimize repeats