Fixed problem where flann indexes were not properly deleted. And other things
Updated schema. Added example script