Refactoring: extract callback
Merge pull request #2 from danielsoro/extract-callbacks

Refactoring: extract callback