Add more tests and make insertMulti more robust