cleans up test code a bit