Various scripts, some mine, some borrowed.