Tests fix
Minor code cleaning