Version final del refactor