Refactor packages to logical division