Merge pull request #25 from robhudson/read-api-500

Updated to not write transactions when server errors.
Updated to be more granular with transactions.