Major refactor of legacy script
trying to merge pr/90
Merge branch 'brianchirls-legacy-refactor' into veev