Remove python-magic. Interfered with gzipping.
Slight tweaks to code style and JS.