Fixed concurrency issues on inserts, refactored some tests
updated README