Attribute callbacks capsulated

Attribute callbacks capsulated with a function. This function has
try-catch scope and calls scope.received function by default.

Syntax warnings are cleared.