Rewrite and setup structure.