Move function in proper file and fix verbose gestion.