added ConfigDevice class and supporting methods/functions.

I forked before you made some minor changes, but I think I incorporated the changes into the files that I edited.