Added transaction retry code to make test pass
Minor tweaks
Finished the basic integration tests