Full refactor of the scripts to make them more usable.