Another attempt to cleanup this DB transaction nonsense