Minor:

- cleanup and convert
Never create a global variable unless its gonna be used in other scripts, add local before table.