Remove dummy code
Add unit tests
Support unclearing transactions