code cleanup and additional documentation

Signed-off-by: gburgett <gordon.burgett@gmail.com>