Modified the code as per the new config files - work in progress