More refactors to the structure for a better and organized architecture