Single page application

In the process of migrating everything to a single page app (incomplete).