Initial code review

@evanstade Please review.  Hopefully the pull request flow will let you add comments.
this needs comments