[#79107626] Refactors the code