Updated config to reflect new config structure
Big refactor and tidy