Implement transaction rollback

Closes #4