Simplified code when refreshing.
Metadata is only manipulated in internal db, writing to file has to be explicitely specified. In fact, writing to file is currently disabled because it is quite awful at this point.