End rewrite layout