Refactoring and fix for license files