final refactoring. No preference. Rearrangements of the code, package