Several Bookkeeping fixes
BEGINRELEASENOTES
*Bookkeeping FIX: fix bug while constructing SQL for getting files FIX: several code simplifications
*Test NEW: new integration BKK test CHANGE: re-running BKK integration tests made easier
ENDRELEASENOTES
Edited by Federico Stagni