Added config value checking.

Basic value checking and sanity checks are made.
Writing a config out should be as simple as offloading a dict.