more refactoring of the different components