Passing tests. Cleaned up code. Still need to check safety against rollback and swamp attackts.