Refactor some features for the Base module and also creating Entities, Repositories and Services.