Simplify code, add licence header to index.html and settings.cc/.h