refactoring packages and extensions files