Transactions and applications rest api

@rcrichton - code review

Fixes #4 and fixes #5