Refactoring of package and code