Changed callback parameters to standard err and data.
Added more tests.