Inserted code from initial effort.

Warnings and such have to be cleared now; this does not run due to
strict/warnings.
An example program that uses the new module.
Ironed out warnings and minor bugs. It's working now.