Added better inline documentation.
Changed MODULE to FUNCTION as appropriate.
Improved namespace names.
Added inline test.

Signed-off-by: Gordon Smith <gordon.smith@lexisnexis.com>