simple code reorg
improve speed of insert by checking for merge only around insertion
index
replace sqlite by custom storage