added copy implementation and refactored xfile platform implementations to be internals