use callables in before und after hooks
Merge pull request #121 from levitin/enable_callables

use callables in before und after hooks