Generalized fields, cleaned up, fixed minor bugs. Should be ready for
customer use now (as a template).

Signed-off-by: Chris Roblee <chris@playnomics.com>