Basic transactions logic.

Some silly attention paid to unit test coverage. Transactions domain has
very naive functionality.