Added TransactionalState. Refactored commit, rollback, size.