Refactored and continued on the glTF exporter.