Parse config enum

These are the changes since the previous version. Mostly for David to review. I can do the pull request into master from this branch later.