Update for an Issue #361
Code restyling
Few bug fixes in -d (there were late values in payloads in some cases; sqlalchemy returns RowProxy for tuple)