Make it work under new Chrome

Change to manifest.json makes it possible to install it as unpacked extension to new Chrome. Also a bit of code cleanup.