Reorganising code in preparation for the move towards user defined configs