Rationalizing the denominator et al.



   I have two expressions, test1=1/sqrt(2) and
test2=2*sqrt(2-sqrt(2))/sqrt(2), which I would like Maxima to display as
sqrt(2)/2 and sqrt(2*(sqrt(2)-1)), respectively.  Both involve rationalizing
the denominator, and the second involves pulling terms inside a radical (a
la rootscontract) and factoring inside.  Is there a straightforward way to
obtain these results?  My six attempts in Maxima 5.13.0 for test1 failed:
	ratsimp(test1);
	rat(test1);
	test1,ratalgdenom=true;
	test1,algebraic=true;
	radcan(test1);
	test1,radexpand=true;