First revision.

Includes the main script, and a batch file for running it.