Add more tests

Includes fixed callback code from earlier pull request on master.