LPS-44431 Apply the new logic using the generic approach, so we can remove the dependencies. No logic change have been applied here, just a better way to organized the code in a clenar and easier way