Ok.. I'm going to start the "refactoring". I have a doubt, is it correct if I wire the grounds in this way?
That will likely work. There is nothing 'wrong' with it, but if we take some time we can do better and learn a few things about grounding along the way.
There have been volumes of work dedicated to proper grounding techniques. In an ideal world, connecting any ground to another ground will work. Daisy-chain, ground plane, grids, star networks, they should all work the same. The ground should have the same potential everywhere and no signal will influence another.
Of course in practice it isn't that easy. Even short traces (or wires) have some inherent resistance. They also cause inductive cross talk between signals i.e. two wires side-by-side act as a tiny transformer so that the signal on one causes noise on the other and vice versa.
One method for minimizing this for sensitive signals (our analog in this case) is to create a seperate single-point gound. All analog grounds should tie to this point directly via the shortest route. AGND of the ATMega should also tie to this point. Then a single wire should be connected directly to the power supply.

Note in the drawing that the digital items run on seperate return wires but we don't worry about daisy-chaining the grounds together, as digital signals are less sensitive to issues with noise.
A similar technique can be used for the +5V and the pots and AVcc . As I mentioned earlier, you would want a ferrite bead between Vcc and AVcc to help filter the noise.