Minor fixes. Includes a test module.