Better front-end architecture - assuming SPA, not quite there yet