Swapping order of config and object creation to allow more configuration through the config file