Modular weights, U(1)'s and mass matrices