Added callbacks on generate
Merge pull request #9 from auser/master

Added callbacks on generate