refactor how import and export work. now handle via byte streams, much more efficient