Rewrite nested function

Conflicts:
	mol.0.0.6/rmsd.c