Major update to mapping and partialfile