Fix settings and template/js loading