Add a simple test program.
Fix and complete documentation.