Refactor transaction class

Yeap, thanks