How I reduce the number of global variable in a sketch ?