Converted the two scripts into normal Python scripts that can be imported/executed