Refactor transaction class

I feel like we should. Another PR it is