Updating script to stand alone.