Improved package generation
Refactoring