Executed the function within the closure.
Merge pull request #73 from aeolu/bug/hooks-are-not-called-correctly

Hook methods are now called in a closure, making them instance methods.