Refactor packages to a flat structure.