corrected popcommit and hasnext
Removed unit tests temporarily
Naive roundtrip working