package-based settings and code rewrite