Refactor to flat package.