Clean up test function