Fixes for packaging

- Add autoload cookies
- Don't create top-level variables by using `setq`: prefer `let`
- More concise code
- Remove unnecessary boilerplate
Merge pull request #1 from purcell/patch-1

Fixes for packaging