First refactoring of Powertypes pattern + Some cleaning