Transaction refactor and tests, add/remove accounts