replaced pickle with some xml, which is a bit more readable. Also moved _fixMappings() call where it belongs.