Refactor to stata_import