Architecture change and code rewrite