refactord conversion functions out into a config file.