Rewrite to create a single page app