Added datahandler behavior.
Extensive testing of all error situations remains to be done.