Re-wrote entire config code.

Using YAML for config files now. Went from a large function to a generic
class that will work with other projects.