Splits out Repository trait.

Cleans up TxController so that only repository operations are invoked.