Refactored account and transaction to follow standard pattern