Refactor, added a TransactionBean and dependency injection