add somme comments and remove spurious print.
remove useless code