minor tests code clean up