Add flags support. Split operation replace, store, insert from one insert