Restructure app a bit so visualizations can be used for html dashboards