[TASK] clean up transaction class

- remove ensureConnected
- adopt new Error use for communication failure cases
- add newline whitespace for readability