Major refactoring to improve the future handling and consistency