Add config parsing and writing. Probably still needs some work, but basic functionality is there.