Return transaction as JSON and fix styles