Add templating callback 'beforeAdd'; add callback arg 'isFirstExecution'
Add spec for beforeAdd callback; fix beforeAdd callback invocation