Initial work for review.

Ultimately I will want to break this up into a few pull requests.  If the commits could be reviewed like this I would appreciate it.  Then I can break things up into smaller chunks.

Thanks