Implement load hooks. Closes #316
Merge pull request #318 from hadley/hooks

Implement load hooks