App structure rewrite