Move x3g processing to separate method.