Implement derivatives hook.
Add function comment and get rid of unused variable.
Merge pull request #95 from adam-vessey/7.x-derivatives

Implement derivatives hook.