Migrate reference.conf detection to be  task.

Also create an intermediate setting to clean up some of the code.