More refactoring before the actual implementation of transaction support