WIP:  Re-factor into separate files.

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