added support for expedited data transfer. Various bugfixes