Looks like using sort() and dedup() on a Vec didn't correctly remove all duplicates, which meant that when we were destroying chains, we could end up destroying a chain with the same id twice. However, since the id would now refer to another chain, that chain would be deleted instead
Removed extra whitespace and a debug println statement
Merge pull request #28 from TisButMe/fix-chain-removing-bug

Fixes #19 ! (At least passes the test case...)