Clean warnings and remove useless prints.