Added JSON config class and improved overall configuration stuff.