Cleanup test related function