Large refactor to clean up all the shit, still tons more to do.
Fixed run script