Added some new routes, refactored a little bit
unified transaction logic in transactions.js