.gitignore, and many a hook.

- Added gitignore to ignore byte-compiled files.
- Made much functionality only load when it's needed in hooks.