DOC: Added documentation and minor fixes to the datahandler