Fix bug with cid and removing from index
Fix incremental index remove
Add test for previous id removal and fix bugs
Some refactoring and cleaning
Add missing test assertion
Merge pull request #16 from mojotech/pt/bugs

Pt/bugs