Cloned all remaining SEM710 functions from the visual basic code.