small refactoring + tests

behaviour_info was rewritten with "-callback" specification, that is more correct way
added tests