HM/TJ: added delayed commit based on timeout or nr of "commits"
TJ/HM: removed unnecessary asssignments.