First pass at transactions. API needs polish.
Added transaction struct