Clean up the config class to use @config better. Add some nil checking.