Updated it to work with varnish 4.0.1

Added some more comments and a few tweaks.