Rewrite general architecture (cleanout)