Various fixes

* Add autoload cookies
* Use standard header structure, including copyright & licence
* Format parens idiomatically
* Eliminate byte-compilation warnings
Merge pull request #1 from purcell/patch-1

Various fixes